package en.edu.scau.cmi.zhanzhiyong.carpter10;

import java.io.*;

public class Example10_1 {
	
	public static void main(String args[]) {
		File f = new File("F:\\1.xlsx");
		System.out.println(f.getName() + f.canRead());
		System.out.println(f.length());
		System.out.println(f.getAbsolutePath());
		File file = new File("new.txt");
		if(!file.exists()) {
			try {
				file.createNewFile();
				System.out.println("create a file successfully");
			}
			catch(Exception e) {
				System.out.println(e);
			}
		}
	}
}
